package com.zmn.plat.model.dto.request;

import com.zmn.common.constant.GlobalConsts;
import lombok.Data;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * @author tanbiao
 * @description
 * @modifier
 * @since 2020/9/11 16:00
 **/
@Data
public class TreeNodeDTO implements Serializable {
    private static final long serialVersionUID = 8109707976378326003L;
    private String name;
    private Integer value;
    private boolean selected;
    private boolean disabled;
    private List<TreeNodeDTO> children = new ArrayList<>(GlobalConsts.NO);

    public TreeNodeDTO(String name, Integer value) {
        this.name = name;
        this.value = value;
    }

    public TreeNodeDTO(String name, Integer value, boolean selected) {
        this.name = name;
        this.value = value;
        this.selected = selected;
    }

    public TreeNodeDTO(String name, Integer value, boolean selected, boolean disabled) {
        this.name = name;
        this.value = value;
        this.selected = selected;
        this.disabled = disabled;
    }

    public TreeNodeDTO() {
    }
}
